﻿@{
    Layout = "~/Views/Shared/_LayoutHaveManue.cshtml";
}
<h2>发布公告</h2>
<a href="/Manage/Index/">返回</a>
<script type="text/javascript">
    $(function () {
        $('#publish').bind("click",null,addNoticeAjax);

    })
    function addNoticeAjax() {
        var stopGame = false;
        if ($("input[name='stopTheGame']:checked").val() == "true") {
            stopGame =true;
        }
        $.ajax({
            url: "/Manage/addNewNotice/",
            type: 'post',
            dataType: 'text',
            data:{content:$("#content").val(),stopTheGame:stopGame},
            success: function () {
                alert("添加完成");

            }
        })
    }

</script>
<textarea id="content" name="content" class="form-control" rows="10"></textarea><br />
<input type="radio" name="stopTheGame" id="closeTheGame" value="true" />关闭游戏
<input type="radio" name="stopTheGame" value="false" checked="checked" />启动游戏
<a href="/Manage/noticesManager/">查看公告列表</a><br />
<button type="button" id="publish" class="btn btn-warning btn-lg btn-block text-center" value="发 布">
    <span class="glyphicon glyphicon-globe"></span> 点 击 发 布
</button>

